import React from 'react';
import { useNavigate } from 'react-router-dom';

export default function Button({ text, params }) {
    let navigate  = useNavigate();

    function handleClick() {
        navigate({
            pathname: '/index',
            search: '?sort=name',
            hash: '#r',
            state: { fromDashboard: true }
        });
    }
    return (
        <>
            <button onClick={handleClick} className='bg-slate-100 border bg-slate-200'>{text}</button>
        </>
    )
}
